local js = require "js"
local Vue = js.global.Vue

local vueApp = Vue:createApp(loader.obj({
    el = "#app",
    components = loader.obj({
        demo = loader.import('./view/components/demo.vue'),
        demo2 = loader.import('./view/components/demo2.vue'),
    }),
    data = function()
        return loader.obj({
            message = "lua 写 vue3",
            num = 1
        })
    end,
    methods = loader.obj({
        clickOnClick = function(self)
            self.message = '用 lua 写 vue3'
        end
    }),
}))

vueApp:mount('#app')

js.global.vueApp = vueApp
